using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Preparation;

namespace Tester.GuiActions.Actions.Impl
{
    public class NewFileAction : BaseAction
    {
        public override bool Visible
        {
            get
            {
                return (TesterMultyDocument.Instance == null || 
                      TesterMultyDocument.Instance.Suspended == TesterMultyDocument.SuspendStates.Stopped) &&
                      (TesterMainForm.Instance.TopControl == EmbededControlTags.TesterList ||
                       TesterMainForm.Instance.TopControl == EmbededControlTags.StartWork);
;
            }
        }

        public override void MainAction(object sender, EventArgs e)
        {
            NewDocumentForm dlg = new NewDocumentForm();
            dlg.ShowDialog();
        }
    }
}
